package smetana.modules.ui.actions;

import com.google.inject.Inject;
import smetana.modules.business.BusinessDoc;
import smetana.modules.ui.model.CursorDoc;

/**
 *
 * @author dmitry.mamonov
 */
public class DeleteDocumentAction  extends AbstractAction{
    @Inject
    BusinessDoc businessDoc;

    @Inject
    CursorDoc cursorDoc;

    public DeleteDocumentAction() {
        super(false);
    }

    @Override
    public void perform() {
        businessDoc.deleteDoc(cursorDoc.get());
        cursorDoc.deleteCurrent();
    }
}
